package com.ruoyi.manager.mapper;

import java.util.List;
import com.ruoyi.manager.domain.Member;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * memberMapper接口
 * 
 * @author ruoyi
 * @date 2025-08-12
 */
public interface MemberMapper 
{
    /**
     * 查询member
     * 
     * @param id member主键
     * @return member
     */
    public Member selectMemberById(Long id);

    /**
     * 查询member列表
     * 
     * @param member member
     * @return member集合
     */
    public List<Member> selectMemberList(Member member);

    /**
     * 新增member
     * 
     * @param member member
     * @return 结果
     */
    public int insertMember(Member member);

    /**
     * 修改member
     * 
     * @param member member
     * @return 结果
     */
    public int updateMember(Member member);

    /**
     * 删除member
     * 
     * @param id member主键
     * @return 结果
     */
    public int deleteMemberById(Long id);

    /**
     * 批量删除member
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMemberByIds(Long[] ids);

    @Select("select * from t_member where name=#{memberName} and phone=#{phone}")
    Member selectByNameAndPhone(@Param("memberName") String memberName, @Param("phone") String phone);


    /**
     * 根据手机号查询会员
     * @param phone
     * @return
     */
    @Select("select * from t_member where phone= #{phone}")
    Member selectByPhone(String phone);
}
